package com.ithemai;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @auther Macrydy
 * @date 2020/7/4 9:38
 */
public class Demo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("a.txt");
        byte[] bytes = new byte[1024];
        int len;
        while ((len=fis.read(bytes))!=-1){
            String s = new String(bytes, 0, len);
            System.out.println(s);
        }
    }
}
